<?php echo $header; ?>
<?php if ($error_warning) { ?>
<div class="warning"><?php echo $error_warning; ?></div>
<?php } ?>
<div class="box">
  <div class="left"></div>
  <div class="right"></div>
  <div class="heading">
    <h1 style="background-image: url('view/image/payment.png');"><?php echo $heading_title; ?></h1>
    <div class="buttons"><a onclick="$('#form').submit();" class="button"><span><?php echo $button_save; ?></span></a><a onclick="location = '<?php echo $cancel; ?>';" class="button"><span><?php echo $button_cancel; ?></span></a></div>
  </div>
  <div class="content">
    <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
      <table class="form">
	  	<tr>
          <td><?php echo $text_help ?></td>
          <td><a href="http://www.opencartguiden.dk" target="_blank">www.opencartguiden.dk</a></td>
        </tr>
	    <tr>
          <td><?php echo $entry_status; ?></td>
          <td><select name="epay_status">
              <?php if ($epay_status) { ?>
              <option value="1" selected="selected"><?php echo $text_enabled; ?></option>
              <option value="0"><?php echo $text_disabled; ?></option>
              <?php } else { ?>
              <option value="1"><?php echo $text_enabled; ?></option>
              <option value="0" selected="selected"><?php echo $text_disabled; ?></option>
              <?php } ?>
            </select></td>
        </tr>
	    <tr>
          <td><?php echo $text_payment ?></td>
          <td><input type="text" name="epay_payment_name" value="<?php echo $epay_payment_name; ?>" /></td>
        </tr>
	    <tr>
          <td><?php echo $text_merchantnumber ?></td>
          <td><input type="text" name="epay_merchant_number" value="<?php echo $epay_merchant_number; ?>" /></td>
        </tr>
		<tr>
          <td><?php echo $entry_order_status; ?></td>
          <td><select name="epay_order_status_id">
              <?php foreach ($order_statuses as $order_status) { ?>
              <?php if ($order_status['order_status_id'] == $epay_order_status_id) { ?>
              <option value="<?php echo $order_status['order_status_id']; ?>" selected="selected"><?php echo $order_status['name']; ?></option>
              <?php } else { ?>
              <option value="<?php echo $order_status['order_status_id']; ?>"><?php echo $order_status['name']; ?></option>
              <?php } ?>
              <?php } ?>
            </select>
			</td>
        </tr>
	    <tr>
          <td><?php echo $text_paymentwindow ?></td>
          <td>
		 	<select name="epay_payment_window">
              <option value="0" <?php echo $epay_payment_window==0 ? 'selected' : '' ?>><?php echo $text_paymentwindow_own ?></option>
			  <option value="1" <?php echo $epay_payment_window==1 ? 'selected' : '' ?>><?php echo $text_paymentwindow_popup ?></option>
			  <option value="2" <?php echo $epay_payment_window==2 ? 'selected' : '' ?>><?php echo $text_paymentwindow_same ?></option>
            </select>
		  </td>
        </tr>

	    <tr>
          <td>MD5 Mode</td>
          <td>
		  	<select name="epay_md5mode">
              <option value="0" <?php echo $epay_md5mode==0 ? 'selected' : '' ?>><?php echo $md5_disabled ?></option>
			  <option value="1" <?php echo $epay_md5mode==1 ? 'selected' : '' ?>><?php echo $md5_a ?></option>
			  <option value="2" <?php echo $epay_md5mode==2 ? 'selected' : '' ?>><?php echo $md5_b ?></option>
            </select>
		  </td>
        </tr>
		<tr>
          <td>MD5 Key</td>
          <td><input type="text" name="epay_md5key" value="<?php echo $epay_md5key; ?>" /></td>
        </tr>
		<tr>
          <td><?php echo $text_fee ?></td>
          <td>
		  	<select name="epay_customerfee">
              <option value="0" <?php echo $epay_customerfee==0 ? 'selected' : '' ?>><?php echo $text_no ?></option>
			  <option value="1" <?php echo $epay_customerfee==1 ? 'selected' : '' ?>><?php echo $text_yes ?></option>
            </select>
		  </td>
        </tr>
		<tr>
          <td><?php echo $text_group ?></td>
          <td><input type="text" name="epay_group" value="<?php echo $epay_group; ?>" /></td>
        </tr>
		<tr>
          <td>Auth SMS</td>
          <td><input type="text" name="epay_authsms" value="<?php echo $epay_authsms; ?>" /> <?php echo $text_service_not_free ?></td>
        </tr>
		 <tr>
          <td>Auth E-mail</td>
          <td><input type="text" name="epay_authemail" value="<?php echo $epay_authemail; ?>" /></td>
        </tr>
	    <tr>
          <td>Splitpayment</td>
          <td><select name="epay_splitpayment">
              <option value="0" <?php echo $epay_splitpayment==0 ? 'selected' : '' ?>><?php echo $text_no ?></option>
			  <option value="1" <?php echo $epay_splitpayment==1 ? 'selected' : '' ?>><?php echo $text_yes ?></option>
            </select></td>
        </tr>
	    <tr>
          <td>Instant capture</td>
          <td>
		  	<select name="epay_instantcapture">
              <option value="0" <?php echo $epay_instantcapture==0 ? 'selected' : '' ?>><?php echo $text_no ?></option>
			  <option value="1" <?php echo $epay_instantcapture==1 ? 'selected' : '' ?>><?php echo $text_yes ?></option>
            </select>
		  </td>
        </tr>
		
	    <tr>
          <td>Show Cardholder field</td>
          <td>
		  	<select name="epay_cardholder">
              <option value="0" <?php echo $epay_cardholder==0 ? 'selected' : '' ?>><?php echo $text_no ?></option>
			  <option value="1" <?php echo $epay_cardholder==1 ? 'selected' : '' ?>><?php echo $text_yes ?></option>
            </select>
		  </td>
        </tr>
	    <tr>
          <td valign="top"><?php echo $text_paymentmethods ?></td>
          <td>
				<input type="checkbox" name="epay_availablepayments_a" value="1" <?php echo $epay_availablepayments_a==1 ? 'checked' : '' ?>> Dankort, VISA / Dankort, eDankort<br>
				<input type="checkbox" name="epay_availablepayments_b" value="1" <?php echo $epay_availablepayments_b==1 ? 'checked' : '' ?>> VISA, Electron, MasterCard, Maestro, JCB<br>
				<input type="checkbox" name="epay_availablepayments_c" value="1" <?php echo $epay_availablepayments_c==1 ? 'checked' : '' ?>> DINERS Club<br>
				<input type="checkbox" name="epay_availablepayments_d" value="1" <?php echo $epay_availablepayments_d==1 ? 'checked' : '' ?>> American Express<br>
				<input type="checkbox" name="epay_availablepayments_e" value="1" <?php echo $epay_availablepayments_e==1 ? 'checked' : '' ?>> Forbrugsforeningen<br>
				<input type="checkbox" name="epay_availablepayments_f" value="1" <?php echo $epay_availablepayments_f==1 ? 'checked' : '' ?>> EWIRE<br>
				<input type="checkbox" name="epay_availablepayments_g" value="1" <?php echo $epay_availablepayments_g==1 ? 'checked' : '' ?>> NORDEA<br>
				<input type="checkbox" name="epay_availablepayments_h" value="1" <?php echo $epay_availablepayments_h==1 ? 'checked' : '' ?>> Danske Bank<br>
		  </td>
        </tr>
	    <tr>
          <td valign="top"><?php echo $text_logos ?></td>
          <td>
				<input type="checkbox" name="epay_logo_a" value="1" <?php echo $epay_logo_a==1 ? 'checked' : '' ?>> ePay<br>
				<input type="checkbox" name="epay_logo_b" value="1" <?php echo $epay_logo_b==1 ? 'checked' : '' ?>> PBS<br>
				<input type="checkbox" name="epay_logo_c" value="1" <?php echo $epay_logo_c==1 ? 'checked' : '' ?>> Euroline<br>
				<input type="checkbox" name="epay_logo_d" value="1" <?php echo $epay_logo_d==1 ? 'checked' : '' ?>> PCI<br>
				<input type="checkbox" name="epay_logo_e" value="1" <?php echo $epay_logo_e==1 ? 'checked' : '' ?>> VISA Secure / MasterCard Secure<br>
                <input type="checkbox" name="epay_logo_f" value="1" <?php echo $epay_logo_f==1 ? 'checked' : '' ?>> Maestro<br>
                <input type="checkbox" name="epay_logo_g" value="1" <?php echo $epay_logo_g==1 ? 'checked' : '' ?>> JCB<br>
		  </td>
        </tr>
        <tr>
          <td><?php echo $entry_geo_zone; ?></td>
          <td><select name="epay_geo_zone_id">
              <option value="0"><?php echo $text_all_zones; ?></option>
              <?php foreach ($geo_zones as $geo_zone) { ?>
              <?php if ($geo_zone['geo_zone_id'] == $epay_geo_zone_id) { ?>
              <option value="<?php echo $geo_zone['geo_zone_id']; ?>" selected="selected"><?php echo $geo_zone['name']; ?></option>
              <?php } else { ?>
              <option value="<?php echo $geo_zone['geo_zone_id']; ?>"><?php echo $geo_zone['name']; ?></option>
              <?php } ?>
              <?php } ?>
            </select></td>
        </tr>

        <tr>
          <td><?php echo $entry_sort_order; ?></td>
          <td><input type="text" name="epay_sort_order" value="<?php echo $epay_sort_order; ?>" size="1" /></td>
        </tr>
      </table>
    </form>
  </div>
</div>
<?php echo $footer; ?>